/*
Copyright 2010  Murali Devi (profdevi@gmail.com)

This file is part of ComineGL Project.

ComineGL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ComineGL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with ComineGL.  If not, see <http://www.gnu.org/licenses/>.

This code uses the irrlicht and irrklang libraries.  Please read
the libraries copyrights at 

	irrlicht library:  http://irrlicht.sourceforge.net
	irrklang library:  http://www.ambiera.com/irrklang

*/



//v0.16 copyright Comine.com 20110925U16
#ifndef Global_h
#define Global_h

///////////////////////////////////////////////////////////
#include "MIrrklang.h"
#include "MIrrlicht.h"
#include "MCGLNodeInfo.h"
#include "MCGLTextureInfo.h"
#include "MCGLSoundInfo.h"
#include "MCGLMeshInfo.h"
#include "MCGLFontInfo.h"
#include "MCGLAnimationInfo.h"
#include "MCGLEventInput.h"
#include "MCGLTriangleSelectorInfo.h"
#include "MIntArray.h"
#include "MTimeEventQueue.h"
#include "TRefCount.h"
#include "TIntRefCountMap.h"
#include "MCGLCameraControl.h"


///////////////////////////////////////////////////////////
extern bool GlobalInitialized;
extern const char GlobalVersion[];								// Hold Version of Library
extern IrrlichtDevice *GlobalRefDevice;							// Reference to Irrlicht Device
extern IVideoDriver *GlobalRefVideoDriver;						// Reference to Irrlicht Video Driver
extern ISceneManager *GlobalRefSceneMgr;						// Reference to Irrlicht Scene Manager
extern IFileSystem *GlobalRefFileSystem;						// Reference to Irrlicht File System
extern ICursorControl *GlobalRefCursorControl;					// Reference to Irrlicht Cursor Control
extern ITimer *GlobalRefTimer;									// Reference to Irrlicht Timer
extern ISceneCollisionManager *GlobalRefCollisionMgr;			// Reference to Irrlicht Collision Mgr
extern IGUIEnvironment *GlobalRefGUIEnvironment;				// Reference to Irrlicht GUI Environment
extern ISoundEngine *GlobalRefSoundDevice;						// Reference to irrKlang Device


//////////////////////////////////////////////////////////
extern TIntRefCountMap<MCGLNodeInfo> GlobalNodeList;			// List of all nodes in scene graph
extern TIntRefCountMap<MCGLTextureInfo> GlobalTextureList;		// List of all textures
extern TIntRefCountMap<MCGLSoundInfo> GlobalSoundList;			// List of all sounds
extern TIntRefCountMap<MCGLMeshInfo> GlobalMeshList;			// List of all meshs
extern TIntRefCountMap<MCGLFontInfo> GlobalFontList;			// List of all fonts
extern TIntRefCountMap<MCGLAnimationInfo> GlobalAnimationList;	// List of all fonts
extern TIntRefCountMap<MCGLTriangleSelectorInfo> GlobalTrisetList;	// List of all Triangle Sets(Called Triangle Selectors in Irrlicht)
extern TIntRefCountMap<MIntArray> GlobalIntArrayList;			// List of all MIntArrays
extern MCGLEventInput GlobalEventInput;							// Event receiver for input devices
extern MTimeEventQueue GlobalTaskQueue;							// Set of all Tesks
extern MTimeEventQueue GlobalTaskQueueInternal;					// Internal Task Queue
extern MCGLCameraControl GlobalCameraControl;					// Holds information about key mappings for camera
extern int GlobalInternalEventID;								// Internal Event ID

/////////////////////////////////////////////////////////////
extern SColor GlobalBackColor;									// Back Color for window
extern bool (*GlobalWindowFrontRenderer)(void);					// Callback for front renderer
extern bool (*GlobalWindowBackRenderer)(void);					// Callback for back renderer
extern bool GlobalGameLoopBreakFlag;							// =true if game loop should break

/////////////////////////////////////////////////////////////
bool GlobalCreate(int width,int height,int bpp,bool fullscreen);
bool GlobalDestroy(void);


#endif // Global_h